package com.xingkeduo.business.schedule.service.workpad;


import com.xingkeduo.business.schedule.remote.WorkPadRemoteService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * 文件概述
 *
 * @author wangxilong <wangxilong@xingkeduo.com>
 * @version id:v0.1 19-5-28 下午5:08
 * @package BeautyOS
 * @copyright Copyright (c) XKD 2019
 */
@JobHandler(value="workpadClockTaskJobHandler")
@Component
public class WorkpadClockTaskJobHandler extends IJobHandler {

    @Autowired
    private WorkPadRemoteService workPadRemoteService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log(s+"每天12点更新未打卡发型师");
        try{
            workPadRemoteService.clockTask();
        }catch (Exception e){
            XxlJobLogger.log(e.getMessage());
        }
        return ReturnT.SUCCESS;
    }
}
